<table class="table">
  <thead>
    <tr>
      <th class="first"><%= sort_link @search, :name, "#{t 'helpers.label.userinfo.name'}" %></th>
      <th><%= sort_link @search, :surname, "#{t 'helpers.label.userinfo.surname'}" %></th>
      <th><%= sort_link @search, :email, "#{t 'helpers.label.userinfo.email'}" %></th>
      <th><%= sort_link @search, :company_name, "#{t 'helpers.label.userinfo.company_name'}" %></th>
      <th><%= sort_link @search, :user_discount, "#{t 'helpers.label.user.discount'}" %></th>
      <th class="last"></th>
    </tr>
  </thead>
  <tfoot>
    <tr>
      <th colspan="4"><%= button_to_new "Vytvořit nového uživatele", new_admin_user_info_path if permitted_to? :create, :admin_user_infos %></th>
      <th colspan="2"><%= paginate user_infos %></th>
    </tr>
  </tfoot>
  <tbody>
    <% unless user_infos.blank? %>
      <%= render :partial => "user_info", :collection => user_infos %>
    <% else %>
      <tr>
        <th colspan="10">Nebyli nalezeni žádní zákazníci.</th>
      </tr>
    <% end %>
  </tbody>
</table>